Optimal. Leaf size=68 \[ \frac {2 \sqrt {x}}{a}-\frac {4 b \tanh ^{-1}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} \left (c+d \sqrt {x}\right )\right )}{\sqrt {a+b}}\right )}{a d \sqrt {a-b} \sqrt {a+b}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.08, antiderivative size = 68, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {4204, 3783, 2659, 208} \[ \frac {2 \sqrt {x}}{a}-\frac {4 b \tanh ^{-1}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} \left (c+d \sqrt {x}\right )\right )}{\sqrt {a+b}}\right )}{a d \sqrt {a-b} \sqrt {a+b}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 208
Rule 2659
Rule 3783
Rule 4204
Rubi steps
\begin {align*} \int \frac {1}{\sqrt {x} \left (a+b \sec \left (c+d \sqrt {x}\right )\right )} \, dx &=2 \operatorname {Subst}\left (\int \frac {1}{a+b \sec (c+d x)} \, dx,x,\sqrt {x}\right )\\ &=\frac {2 \sqrt {x}}{a}-\frac {2 \operatorname {Subst}\left (\int \frac {1}{1+\frac {a \cos (c+d x)}{b}} \, dx,x,\sqrt {x}\right )}{a}\\ &=\frac {2 \sqrt {x}}{a}-\frac {4 \operatorname {Subst}\left (\int \frac {1}{1+\frac {a}{b}+\left (1-\frac {a}{b}\right ) x^2} \, dx,x,\tan \left (\frac {1}{2} \left (c+d \sqrt {x}\right )\right )\right )}{a d}\\ &=\frac {2 \sqrt {x}}{a}-\frac {4 b \tanh ^{-1}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} \left (c+d \sqrt {x}\right )\right )}{\sqrt {a+b}}\right )}{a \sqrt {a-b} \sqrt {a+b} d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.26, size = 69, normalized size = 1.01 \[ \frac {2 \left (\frac {2 b \tanh ^{-1}\left (\frac {(b-a) \tan \left (\frac {1}{2} \left (c+d \sqrt {x}\right )\right )}{\sqrt {a^2-b^2}}\right )}{d \sqrt {a^2-b^2}}+\frac {c}{d}+\sqrt {x}\right )}{a} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.55, size = 274, normalized size = 4.03 \[ \left [\frac {2 \, {\left (a^{2} - b^{2}\right )} d \sqrt {x} + \sqrt {a^{2} - b^{2}} b \log \left (\frac {2 \, a b \cos \left (d \sqrt {x} + c\right ) - {\left (a^{2} - 2 \, b^{2}\right )} \cos \left (d \sqrt {x} + c\right )^{2} + 2 \, a^{2} - b^{2} - 2 \, {\left (\sqrt {a^{2} - b^{2}} b \cos \left (d \sqrt {x} + c\right ) + \sqrt {a^{2} - b^{2}} a\right )} \sin \left (d \sqrt {x} + c\right )}{a^{2} \cos \left (d \sqrt {x} + c\right )^{2} + 2 \, a b \cos \left (d \sqrt {x} + c\right ) + b^{2}}\right )}{{\left (a^{3} - a b^{2}\right )} d}, \frac {2 \, {\left ({\left (a^{2} - b^{2}\right )} d \sqrt {x} - \sqrt {-a^{2} + b^{2}} b \arctan \left (-\frac {\sqrt {-a^{2} + b^{2}} b \cos \left (d \sqrt {x} + c\right ) + \sqrt {-a^{2} + b^{2}} a}{{\left (a^{2} - b^{2}\right )} \sin \left (d \sqrt {x} + c\right )}\right )\right )}}{{\left (a^{3} - a b^{2}\right )} d}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.54, size = 278, normalized size = 4.09 \[ \frac {2 \, {\left (\sqrt {-a^{2} + b^{2}} {\left (a - 2 \, b\right )} d {\left | -a + b \right |} - \sqrt {-a^{2} + b^{2}} {\left | a \right |} {\left | -a + b \right |} {\left | d \right |}\right )} {\left (\pi \left \lfloor \frac {d \sqrt {x} + c}{2 \, \pi } + \frac {1}{2} \right \rfloor + \arctan \left (\frac {\tan \left (\frac {1}{2} \, d \sqrt {x} + \frac {1}{2} \, c\right )}{\sqrt {-\frac {b d + \sqrt {b^{2} d^{2} + {\left (a d + b d\right )} {\left (a d - b d\right )}}}{a d - b d}}}\right )\right )}}{{\left (a^{2} - 2 \, a b + b^{2}\right )} a^{2} d^{2} + {\left (a^{2} b - 2 \, a b^{2} + b^{3}\right )} d {\left | a \right |} {\left | d \right |}} + \frac {2 \, {\left (a d - 2 \, b d + {\left | a \right |} {\left | d \right |}\right )} {\left (\pi \left \lfloor \frac {d \sqrt {x} + c}{2 \, \pi } + \frac {1}{2} \right \rfloor + \arctan \left (\frac {\tan \left (\frac {1}{2} \, d \sqrt {x} + \frac {1}{2} \, c\right )}{\sqrt {-\frac {b d - \sqrt {b^{2} d^{2} + {\left (a d + b d\right )} {\left (a d - b d\right )}}}{a d - b d}}}\right )\right )}}{a^{2} d^{2} - b d {\left | a \right |} {\left | d \right |}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.71, size = 71, normalized size = 1.04 \[ -\frac {4 b \arctanh \left (\frac {\left (a -b \right ) \tan \left (\frac {c}{2}+\frac {d \sqrt {x}}{2}\right )}{\sqrt {\left (a -b \right ) \left (a +b \right )}}\right )}{d a \sqrt {\left (a -b \right ) \left (a +b \right )}}+\frac {4 \arctan \left (\tan \left (\frac {c}{2}+\frac {d \sqrt {x}}{2}\right )\right )}{d a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.75, size = 153, normalized size = 2.25 \[ \frac {2\,\sqrt {x}}{a}+\frac {2\,b\,\ln \left (2\,b\,{\mathrm {e}}^{d\,\sqrt {x}\,1{}\mathrm {i}}\,{\mathrm {e}}^{c\,1{}\mathrm {i}}-\frac {b\,\left (a+b\,{\mathrm {e}}^{d\,\sqrt {x}\,1{}\mathrm {i}}\,{\mathrm {e}}^{c\,1{}\mathrm {i}}\right )\,2{}\mathrm {i}}{\sqrt {a+b}\,\sqrt {a-b}}\right )}{a\,d\,\sqrt {a+b}\,\sqrt {a-b}}-\frac {2\,b\,\ln \left (2\,b\,{\mathrm {e}}^{d\,\sqrt {x}\,1{}\mathrm {i}}\,{\mathrm {e}}^{c\,1{}\mathrm {i}}+\frac {b\,\left (a+b\,{\mathrm {e}}^{d\,\sqrt {x}\,1{}\mathrm {i}}\,{\mathrm {e}}^{c\,1{}\mathrm {i}}\right )\,2{}\mathrm {i}}{\sqrt {a+b}\,\sqrt {a-b}}\right )}{a\,d\,\sqrt {a+b}\,\sqrt {a-b}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {1}{\sqrt {x} \left (a + b \sec {\left (c + d \sqrt {x} \right )}\right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________